{%include file="index.header.tpl.php"%}
{%include file="index.left.tpl.php"%}
 <!--主要内容开始-->
  <div class="content-wrapper">
    <section class="content">
      <div class="row">
        <section class="col-lg-12 connectedSortable">
         <div class="box box-default box-solid">
             <form action="" method="post" enctype="multipart/form-data">
                <div class="box-header with-border">
                    <span class="fa fa-volume-up" style="float:left; font-size:18px; padding-top:3px; color:#3c8dbc;" ></span>
                    <p class="box-title">通知发布</p>
					
                </div>
                <div class="box-body">
                    <div class="form-group">
						  <label for="inputPassword3" style="padding:0;" class="col-md-1 col-xs-4 control-label">
							   文章标题：
						  </label>
						  <div class="input-group col-sm-3 col-xs-4" style="padding:0;">
							   <input type="text" class="form-control" name="inform_title" value="{%$inform_data.inform_title%}"> 
						  </div>
				    </div>
                     <div class="form-group">
						  <label for="inputPassword3" class="col-md-1 control-label"style="padding:0;">
							   文档号：
						  </label>
						  <div class="input-group col-sm-3 col-xs-12" style="padding:0;">
							   <input type="text" class="form-control" name="inform_num" placeholder="可不填写" value="{%$inform_data.inform_num%}"> 
						  </div>						  
				    </div>
                     <div class="form-group">
						  <label for="inputPassword3" class="col-md-1 control-label" style="padding:0;">
							   上级部门：
						  </label>
						  <div class="input-group col-sm-3 col-xs-12">
							   <select class="form-control" name="up_id">
								{%foreach from=$up_lists key=key item=value%}
									<option value="{%$value.up_id%}"{%if $value.up_id==$inform_data.up_id%}selected{%/if%}>{%$value.up_name%}</option>
								{%/foreach%}
								</select> 
						  </div> 
				    </div>
					 <div class="form-group">
						  <label for="inputPassword3" class="col-md-1 control-label" style="padding:0;">
							   下达时间：
						  </label>
						  <div class="input-group col-sm-3 col-xs-12" style="padding:0;">
							   <input type="text" class="form-control" name="start_time" id="datepicker" value="{%$inform_data.start_time%}"> 
                               <div class="input-group-addon">
                                 <i class="fa fa-calendar"></i>
                                </div>
						  </div>						  
				    </div>
                     <div class="form-group">
						  <label for="inputPassword3" class="col-md-1 control-label" style="padding:0;" style="padding:0;">
							   要求完成时间：
						  </label>
						  <div class="input-group col-sm-3 col-xs-12" style="padding:0;">
							   <input type="text" class="form-control" name="end_time" id="date" placeholder="可不填写" value="{%$inform_data.end_time%}"> 
                               <div class="input-group-addon">
                                 <i class="fa fa-calendar"></i>
                                </div>
						  </div>						  
				    </div>
					<div style="clear:both; height:20px;"></div>
                    <div class="form-group">
						 <label for="inputPassword3" class="col-md-1 control-label" style="padding:0;">
							   备注内容：
						  </label>
				         <div class="input-group col-sm-10 col-xs-10">
						   <textarea id="category_content" name="inform_content" rows="22" cols="40" style="width: 100%">{%$inform_data.inform_content%}</textarea>
					    </div>
					</div> 
					 <div class="form-group">
						  <label for="inputPassword3" class="col-md-1 control-label" style="padding:0;">
							   附件：
						  </label>
						 <div class="input-group col-md-6 col-sm-12 col-xs-12">
							 {%if $inform_data.inform_file!=""%}
							 <br><input type="radio" name="inform_file_re" value="0" checked>
							 <a href="upload/inform_file/{%$data.inform_file%}" target="_blank">{%$inform_data.inform_file%}</a>
							 <br><br><input type="radio" name="inform_file_re" value="1" > 重新上传 <input id="inform_file" name="inform_file" type="file" size="60"/>
							 {%else%}
							 <input id="inform_file" name="inform_file" type="file" size="60"/>
							 <input type="hidden" name="inform_file_re" value="1">
							 {%/if%}
						 </div>
				    </div>					
				</div><!--box-body -->
                <div class="box-footer text-center">
                    <button type="submit" class="btn btn-primary ">保 存</button>
                </div>
             </form>
           </div><!--box box-default box-solid-->
        </section>   
           
        </div><!--row-->
    </section>
 </div>
  <!--主要内容结束-->
{%include file="index.footer.tpl.php"%}
<script>
 $(function() {
    $( "#datepicker" ).datepicker({

      showOtherMonths: true,
      selectOtherMonths: true,
	  changeMonth: true,
      changeYear: true,   
    });
	 $( "#date" ).datepicker({

      showOtherMonths: true,
      selectOtherMonths: true,
	  changeMonth: true,
      changeYear: true,   
    });
 })
</script>
<!--添加-->
 <script type="text/javascript">
        $(document).ready(function(){
            $("#new").hide();
            $("#add").hide();
			
            $("#add").click(function(){
                $("#s1").append("<option>"+$("#new").val()+"</option>");
                $("#new").val('');
            });
        });
        function a()
        {
            var val = $("#s1").val();
            if (val == '自定义') {
                $("#new").show();
                $("#add").show();
            } else{
                 $("#new").hide();
                 $("#add").hide();
            };
			
        }
    </script>
    <script type="text/javascript">
        $(document).ready(function () {	
         $("#s1").change(function () {
			$.ajax({
			url:" ",
			type:"get",
			data: $("#new").val(),
			dataType:"json",
			success:function(msg){	
					$.each(msg, function (n, value) {
					   $("#s1").html ("<option value='" + value.student_id + "'>" + value.student_name + "</option>");
					});  		   
                }
            });
		  });	
        });
    </script>
<!--编辑器-->
<script type="text/javascript" src="static/xhe/xheditor-1.2.2.min.js"></script>
<script type="text/javascript" src="static/xhe/xheditor_lang/zh-cn.js"></script>
<script type="text/javascript">
$(pageInit);
function pageInit()
{
	$.extend(XHEDITOR.settings,{shortcuts:{'ctrl+enter':submitForm}});//修改默认设置
	$('#category_content').xheditor({modalWidth:700,modalHeight:500,upBtnText:'浏览',upLinkUrl:"!ckfinder/upload.html",upImgUrl:"!ckfinder/upload.html?type=Images",upFlashUrl:"!ckfinder/upload.html?type=Flash",upMediaUrl:"!ckfinder/upload.html"});
}
function submitForm(){$('#myform').submit();}
</script>